
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
  <meta charset="utf-8">
  <title>注册</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="比奇堡招聘网">
  <meta name="description" content="我们要成为全球最大的招聘网站">
  <link rel="stylesheet" th:href="@{/layui/css/layui.css}" media="all">
  <link rel="stylesheet" th:href="@{/css/global.css}">
</head>
<body>

<div th:insert="~{index::topbar}"></div>

<div class="layui-container fly-marginTop">
  <div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title">
        <li class="layui-this">个人信息</li>
      </ul>
      <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
        <div class="layui-tab-item layui-show">
          <div class="layui-form layui-form-pane">
            <div th:if="${type=='admin'}">
              <form method="post" th:action="@{/doreg}" >
                <div class="layui-form-item">
                  <label class="layui-form-label">姓名</label>
                  <div class="layui-input-inline">
                    <input type="text" name="name" required autocomplete="off" class="layui-input">
                  </div>
                </div>
                <div class="layui-form-item">
                  <button class="layui-btn" lay-filter="formDemo" lay-submit>提交</button>
                </div>
              </form>
            </div>
            <div th:if="${type=='seeker'}">
              <form method="post" th:action="@{/updateseeker}">
                <div class="layui-form-item">
                  <label class="layui-form-label">姓名</label>
                  <div class="layui-input-inline">
                    <input type="text" name="name" autocomplete="off" class="layui-input" th:value="${seeker.name}">
                  </div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">性别</label>
                  <div class="layui-input-block" >
                    <input type="radio" name="sex" value="男" title="男" checked>
                    <input type="radio" name="sex" value="女" title="女">
                  </div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">年龄</label>
                  <div class="layui-input-inline">
                    <input type="text" name="age" autocomplete="off" class="layui-input" th:value="${seeker.age}">
                  </div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">电话</label>
                  <div class="layui-input-inline">
                    <input type="text" name="phone" autocomplete="off" class="layui-input" th:value="${seeker.phone}">
                  </div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">邮箱</label>
                  <div class="layui-input-inline">
                    <input type="text" name="email" autocomplete="off" class="layui-input" th:value="${seeker.email}">
                  </div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">学历</label>
                  <div class="layui-input-inline">
                    <input type="text" name="education" autocomplete="off" class="layui-input" th:value="${seeker.education}">
                  </div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">期望职位</label>
                  <div class="layui-input-inline">
                    <input type="text" name="post" autocomplete="off" class="layui-input" th:value="${seeker.post}">
                  </div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">期望薪资</label>
                  <div class="layui-input-inline">
                    <input type="text" name="salary" autocomplete="off" class="layui-input" th:value="${seeker.salary}">
                  </div>
                </div>
                <div class="layui-form-item">
                  <button type="button" class="layui-btn" id="test3"><i class="layui-icon"></i>上传简历</button>
                </div>
                <div class="layui-form-item">
                  <button class="layui-btn" lay-filter="formDemo" lay-submit>提交</button>
                </div>
              </form>
            </div>
            <div th:if="${type=='company'}">
              <form method="post" th:action="@{/updatecompany}">
                <div class="layui-form-item">
                  <label class="layui-form-label">公司名</label>
                  <div class="layui-input-inline">
                    <input type="text" name="name" autocomplete="off" class="layui-input" th:value="${company.name}">
                  </div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">地址</label>
                  <div class="layui-input-inline">
                    <input type="text" name="address" autocomplete="off" class="layui-input" th:value="${company.address}">
                  </div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">简介</label>
                  <div class="layui-input-inline">
                    <input type="text" height="6" name="introduction" autocomplete="off" class="layui-input" th:value="${company.introduction}">
                  </div>
                </div>
                <div class="layui-form-item">
                  <button class="layui-btn" lay-filter="formDemo" lay-submit>提交</button>
                </div>
              </form>
            </div>

          </div>
        </div>
      </div>
    </div>
  </div>

</div>

<div th:insert="~{index::bootombar}"></div>

<script th:src="@{/layui/layui.js}"></script>
<script>
  layui.use('form', function(){
    var form = layui.form;
  });
  layui.use('upload',function () {
    var $ = layui.jquery
    ,upload = layui.upload;
    upload.render({
      elem:'#test3'
      ,url:'/file/upload'
      ,accept:'file'
      ,exts:'pdf|docx'
      ,done:function (res) {
        layer.msg('上传成功');
      }
      ,error:function (res) {
        layer.msg('上传失败');
      }
    });
  })
</script>

</body>
</html>